export default [
  {
    path: '/',
    component: '../layouts/BlankLayout',
    routes: [
      {
        path: '/user',
        component: '../layouts/UserLayout',
        routes: [
          {
            name: 'login',
            path: '/user/login',
            component: './User/login',
          },
        ],
      },
      {
        path: '/',
        component: '../layouts/SecurityLayout',
        routes: [
          {
            path: '/',
            component: '../layouts/BasicLayout',
            authority: ['admin', 'user'],
            routes: [
              // 配置默认首页重定向路径
              {
                path: '/',
                redirect: '/welcome',
              },
              {
                // name: 'welcome',
                // 不要 name 属性, 表示该组件对应路径, 但不在左侧菜单栏显示链接
                path: '/welcome',
                component: './Welcome',
              },
              // 自定义路由和菜单
              // 房源管理
              {
                path: '/house',
                name: 'house',
                icon: 'home',
                routes: [
                  {
                    path: '/house',
                    redirect: '/house/resource',
                  },
                  {
                    path: '/house/resource',
                    name: 'resource',
                    component: './House/Resource'
                  },
                  {
                    path: '/house/addResource',
                    name: 'addResource',
                    component: './House/AddResource'
                  },
                  {
                    path: '/house/kanfang',
                    name: 'kanfang',
                    component: './House/KanFang'
                  },
                  {
                    path: '/house/zufang',
                    name: 'zufang',
                    component: './House/ZuFang'
                  }
                ]
              },
              // 自定义路由和菜单
              {
                component: './404',
              },
            ],
          },
          {
            component: './404',
          },
        ],
      },
    ],
  },
  {
    component: './404',
  },
];
